package com.atguigu.gmall.order.controller;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.common.util.JsonUtil;
import com.atguigu.gmall.model.to.ware.WareOrderTo;
import com.atguigu.gmall.model.to.ware.WareSplitVo;
import com.atguigu.gmall.order.service.OrderInfoService;
import com.fasterxml.jackson.core.type.TypeReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author A
 * @version 1.0
 * @description: TODO
 * @date 2025/9/17 19:22
 */
@RestController
@RequestMapping("/api/order")
public class OrderWareController {
    @Autowired
    private OrderInfoService orderInfoService;

    @PostMapping("/orderSplit")
    public List<WareOrderTo> orderSplit(WareSplitVo wareSplitVo){

        List<WareOrderTo> wareOrderToList=orderInfoService.splitOrder(wareSplitVo);
        return wareOrderToList;
    }
}
